<div class="control-group form-horizontal">
    <label class="control-label-small" ><%= lable %></label>
    <p class="icd-element-relation-name controls-text-small" ><%= name1 %> - <%= name2 %></p>
    <div class="icd-element-input" style="display: none">
        <label class="control-label-small" >Class1</label>
        <div class="controls-small icd-element-input">
            <input type="text" value= "<%=name1%>" class="span2 icd-element-search input-1"  style="background-color: #f7f7f7"  data-provide="typeahead" data-items="10" autocomplete="off">
        </div>

        <label class="control-label-small" >Class2</label>
        <div class="controls-small icd-element-input">
            <input type="text" value= "<%=name2%>" class="span2 icd-element-search input-2"  style="background-color: #f7f7f7"  data-provide="typeahead" data-items="10" autocomplete="off">
        </div>
        <div class="btn-group  controls-small">
            <a href="javascript:;" class="btn btn-primary icd-element-relation-input-submit">确定</a>
            <a href="javascript:;" class="btn icd-element-relation-input-cancel">取消</a>
            <a href="javascript:;" class="btn icd-element-relation-input-delete">删除</a>
        </div>
    </div>
</div>

<script type="text/javascript">
    $(function(){
        $('.icd-element-search').typeahead({
            source:function(query, process)
            {
                $.ajax({
                    url: '/post/search',
                    type: 'POST',
                    data: {},
                    dataType: 'json',
                    async: true,
                    success: function(msg)
                    {
                        process(msg);
                    }
                });
            }
        });
    });
</script>